Fix some bugs
deprecated