Fixed variable returning from functions so that real variables can be returned.