Added a safety check to ensure that a 'previous()' call doesn't crash (not sure if it's needed or not).