Fixing divide by zero error in parser