fix bug on database filter_by