Fixed a bug "NullPointerException" when getPrev.