Fixing some nasty capfile issues