fix bug where the key wasn't getting set