Fix bug on PgSQL if user in on another entity than 1