Fix ugly code
Merge pull request #146 from m-2k/patch-1

Fix ugly code