Fix and improve error message for transition into unknown state