fix undefined error when multiple calculate calls happen after each other
v0.0.3