fixed bug when providing begin and end reference positions as strings