Fixed some permission stuff including integration.