Item11003

this is a fix with unit test for http://foswiki.org/Tasks/Item11003