more fixes for production mode