Fixing functions permissions