Some fixes to make it run in prod