fix log message, the privious state was not print correctly