code cleanup
fixed bug when starting in prod mode