Fix patching in non-ldap case