Fixing WHERE clause for getBalance call

Addresses #536