fixed bug in the user permission code when creating models with ACL;