Fixed bug recently introduced with fix for issue 1147