fix calcore bugs partly