Fixed is_update algrithom.