resolve js bugs