bug fix in the pinch and added maximun duration for animation