Fixes for release builds