fix add_pawn + check malloc