partially fixed pagination
added last support to pagination mechanism