added fix for issue 604 and 605
5 files changed