Added check for before calling winCheck