Fixing precedence bug