fixed few problems with cals package