Fixing JavaScript functionality scroll to id