fix bug in data controller