Small fixes
Fix chmod bug