Fix #377 with a workaround.