Function loading fix