Fixed multiple issues with resource access