Bug fixed in middleware . now other roles than public work also