Fixed functions involving createVariable including mutex
Fixed functions involving createVariable including mutex