Fixes error, wasnt updating values