Fixes some bugs with add_key page