Fixed some cell painting issues