Ferguson era ends with freak goal fest