Bug fix #1 Key was not being set