CFY-516 fixed some bugs