Implementing multi scalar version of real multidim.
Fixed a bug.