undefine == null, use null for more situation
fix sample page bug
fix: sink into dead loop when already at the top