fixed permissions issue properly this time