several small fixes in the scripts