Fixed bug in the update proccess