fix horizontal overflow bug