Negative balance is possible since 1.4-beta2

This pull request not entirely fix the issue, negative balance still possible but very little compare to without these changes:

anton