Fix Y coordinate calculation
Optimize previous commit
Merge pull request #3 from Zeken/master

Fix Y coordinate calculation