bugs fix and css optimization