Minimized shifts between planes during frame alignment.
Made shifts non-negative.