Command works with exception of updating database