fixed issue with Matrix import in calcGamma