fixed bug on value changing