fix #14: patch from ticket