There was a problem with the ceiling function, I was passing an integer (/100) instead of a float (/100.0)