fix a bug with page=nil