Fixes #2242 #2243