fixes to get it working from prod