fix small js errors