Enhanced shape handling