Incorporate bug fixes made in the Canopy project