Hack required by libnpengine (whole thing needs re-writing anyway...