Fixes to CF build