Fixed bug in updateNeeded()