fix bug in loading js lib files