fix for #1080

Fix for #1080