fixed problem with math