Added missing bug fixes from CT