Fix silly reference error saving previous coordinate.