fix a bug in landscape mode.