Fixed a bug that made the last goal never be set to ok.