backport fix #30