fix to dodgy nesting in shell commmand