fix bug on minor code components