fixed bug with loading