Fixes pagination bug when username attribute was set