Fix bug that ret not  register