query fixes for new Usertable

Signed-off-by: Stefano Leccese <stefano-leccese@visiongamestudios.de>