fix js bugs and css setting