added the active and also fixed the access control