Fix BED parsing