bad math fixed