Feature/calc bug fixes