PA3: fix vertical bug