issue #19: const cast to avoid compile error