Fixed some stuff with calculate.js