Fixed an NPE in getting previous vertex value