Fix math equals bugs