fix capfile and major production issues