fix bugs of page.go
add unit test for page.go