amend bug fix