fixing some css and bad logic