corrected to run in production mode