Second stab at fixing #1397