Fix page allocation error, still have some mem leak