Minor changes to fix build in release mode