fix the bug on entered sum