Fix the editor painting black squares. Closes #4416