Simple fix for Trac #1199 (pls merge to branch)