skeleton: don't defer unless there isn't an error to avoid crashes