fix js error when removing a contract line from hand over