Fixed a bug with the current position not being reset correctly.