Fixed #2981: clear up the temporary codes