Bug fix for key support