Fixed use of function