Fixed incorrect return type on legacy langauge function.