Applying fix for #978 to develop