Fixes to release build