Fixes second issue for #1221