fixed a bug in how bed file boundaries were defined