tests for instances. fixed an error precedence issue.