Corrected loading code