Fixed previous pointer in A*.