fixed affixNav method to remove nav when the end of the content is reached