temporary bug fix on pressing up/down (this causes out of range exceptions for single line).
i think a more considerable bug fix would also handle multiline also