Fix functions file