Fix for ide tickets 24, 25, 30.