mount volume command mount the same volume

If I use the mount volume command to mount multiple volumes it mount the volumes with the correct names but the contents of each mount are the same as the last volume mounted.

I am using this script

mount volume “afp://server/volume1” as user name “user” with password “password”
mount volume “afp://server/volume2” as user name “user” with password “password”

If I split the mount volume commands into separate scripts it will work so I also tried putting delays in between the commands but that didn’t work either.

Thanks
Kerry