Calculator fixes