fix up-down arrows behaviour