It seems division using magic number doesn't work correctly. To be checked