Better fix for issue #1324