fixes to run on uaf