adding fix for pull top, and adding tests