fixing permisions and syntax