Use Math.floor to get proper element size