Fix for #560
Merge pull request #567 from phantium/t560

Add fix for ticket #560