minor fix scroll function