Fixes syntax in function