fix compiler crash in error case