Fixed the .closest method