fixed wrong precedence for application