fix Math.floor to Math.ceil