Fixed bug when reusing calc obj, added test