Fix production mode (not completely)