fixed compile errors in release builds