fix for js paging bug, AEROGEAR-893
adding test for AEROGEAR-893