possibly fix #4051 and #4052