Fixed so that you can now add devices into the local database