Tests for issue #646
Fix for issue #646
Formatting
Merge pull request #648 from Eemuli/master

Fix for issue #646