Fix ALL the bugs (including the rounding of coordinates)

Signed-off-by: Piotr Bocheński <bochenski.piotr@gmail.com>