fix for #109 (fix wrong error handling when FLAG_NOESCAPE enabled)