fix horizontal / vertical scroll bug