Corrected the detection of goto current page

Signed-off-by: Pascal Piche <pascal@nitriques.com>