Animate scrollTop scrolls up and down but and doesn't go to top

When you click on .main-accordion-tab or .sub-accordion-tab it will just go passed the top of the page and then sometimes not… Also noticed when .main-accordion-tab is clicked and opened you can click anywhere inside the background

.main-accordion-tab-content, .sub-accordion-tab-content {
    background-color: #f9f9f9;
}

and it will scroll up (this shouldn’t happen) maybe this is confusing it and if you scroll up or down it forces it to go to top again only sometimes.

what should happen

Click .main-accordion-tab which activates scroll to the top of the page with the clicked .main-accordion-tab displaying at the top of page leaving a top margin of 10px, this then opens up and you get one or more .sub-accordion-tab to click on

Click .sub-accordion-tab which activates scroll to the top of the page with the clicked .sub-accordion-tab displaying at the top of page leaving a top margin of 10px

example: h ttps://mega.nz/#!c0w02SCA!nSJSkI4b1jyiDYvsYyEhUNgMV-wbN2ZIjrGsS9A3wy4