Fixed some long-term problems