Fix for Issue#540