Fix building issues on release and debug mode.