Fix unknown refactory case exception, fix some error messages, in the inline refactory