fixed a bug on clearing the calculator