Fix path/perm related issues