try to fix js bugs