Some fixes to make custom paths work.