Added fix for Issue#977