fixed bug with multiple updates