fixed bug in parsing js file