KEYCLOAK-164 and KEYCLOAK-175