fix permission and import error