fix js loading queue