Fixed the trimming to consider the zoom as well.