Fix the pull happening when the top element is not shown

I know it's not maintained but others may see this important patch.