Bugfix for infinite update loop