ITECO: revert some changes from 4b9b9fe and fix bug