Fix a bug where error 0004 wasn't thrown