Fix for key errors