Fix some problem for release build.