Fixed a bug in CalStructGet() function.