Fixed page_total.
Fixed minor bug for os x.