fixed some precedence issues that cropped up during testing