fix braindead math issue