fix for bug #76
fix for bug #86