fix issue reported by @ischneider in https://github.com/opengeo/mapstory/issues/506#issuecomment-13393568