Merging Richard's fix for moab 1.3.1