Few bug fix and improvement the sorting and pagination initialization