pop_mode to global ctx refreshes rules;fix grammar