Fixes bug line 604