Fixed bad math