fixed permissions issues, closes #163