Fix for issue #5 and issue #10.

This solves the OnPageChangeListener callback bug and checks height instead of width when size is changed.