Fix math so it renders better