Fixed syntax error

Function was treated as object