Added reset options and some bug fixed.