fix error code on compile fail, closes #560