Fix bug with the has_active_subscriptuon and also enhance cookbook