Fix bugs with status handler.