Temporary workaround for #2428 and #2061.