A common cause is that the executed script outputs to stderr. This leads per-default to the same failure like a non-zero return code. I would recommend to redirect stderr to stdout (adding the the script 2>@1)
A longer discussion is e.g. here: http://wiki.tcl.tk/1039