fixed issue with table diplaying. Did a bit more on pagination