Fix bug in owner/group assignment