fixed typo and removed console logs on page close