Fixed the bug that registration and ignorenext didn't send back correct error message