fix: don't try to scroll past the end of the file (#6)