Fixes bug with double update