Fixes #3992 Fixes #4147