Loop over dimensions is executed once
Bug fixing