bug fix in the withdraw method