Port fix #1047