Fix for bug #1181... take 2