fixed various compilation issues with deploy and build