Change variable cur to prev