Fixed method calling

If function is not void, return value is assinged to variable