fix bug in data sourcing