Impement patch to prevent fatal errors, see #313