Removed incorrect attachment of function