fixes #47 and also fixed active page indication