Adding tests for permissons w/out object and fixing bugs