Adding fixes for variating page sizes