Removed typo in the attach function definition