fixed bug on negative value