fix bug -- print_contract