Bug fixes related to Ajax pagination