fix bug on attribute mapping