Moving setkey to appropriate place