Check current page before the need of looping. Fixes #9