Fixed #477, Fixed #607, Fixed #604, Fixed #610
Merge pull request #611 from marcj/master

Fixed #477, Fixed #607, Fixed #604, Fixed #610