Fixed #5. Values now updated properly.