fix delete error by changing to a button