Delete bug fixed, contract bug fixed