fix permission and such