fixed mayor check bug