Remove unnecessary cast +  round the ticks
Fix one bug
Thanks to @PunKeel