Switched return and break statements

To fix problem