fixed #182

This pull request fixes issue #182. It has been tested against both ST2 and 3, which both suffer from the issue.