bug fixes in panorama code