Modifed scope to check for active flag