Fixed bug with never ending update