more sql and css fixes