fixed bug in bedextract that sometimes cause skipped output lines