Updated waitForNewData() so it works wit rotations.