fix crash of transaction with empty script