Switched to lround() instead of round()