Make workaround more comprehensive