fixed weasel and xscript error handling