Fixed problem with end of function