fixed some permissions and attributes issues