fix few bugs, production mode