fix portability issues with $ in double quotes