Fixed out of bounds issue and random square zoom issue