Happy homecoming for Pirates as they end losing streak with much-needed win