Error corrected in implementation of dampfunctions