This should be the correct fix for merge of bug #60 from 3.0.