Fixed some funtions to return temp Vectors