Fixes to KEYCLOAK-682