final fixes of bugs and css errors