speeding up loading, fixed bug