fix for transposed query messages
Merge pull request #953 from realm/al-query-error

Fix for transposed error messages