removing keys after assignment fix