see #1241, #1243, #1287