Fixed last page behaviour.