fixed loading memory issue