bug fix on getPreviousPage method, tests update