Calculator bugs fixed