Various fixes for helper scripts