fix Parse error: syntax error, unexpected $end