Many bugs fixes

Update is now working