fix vertical sort