debugging, something wicked with permission modes