Fix broken math