bugfixes for annotated calc