fix js api issue